package com.shuimin.as.service.performance;

import com.shuimin.as.model.performance.DailyReport;
import com.shuimin.as.model.repair.VAsRepairOrder;
import com.shuimin.as.util.DateUtil;
import pond.db.JDBCTmpl;
import pond.db.sql.Criterion;
import pond.db.sql.Sql;
import pond.db.sql.SqlSelect;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by sky on 2017/8/21.
 */
public class DailyReportService {

    public static List<DailyReport> report(String shop_id,Long date,JDBCTmpl t){
        List<DailyReport> list=new ArrayList<>();
        Long[] month=DateUtil.getMonthStartEnd(date);
        //根据日期和门店筛选出符合条件的数据
        SqlSelect sql= Sql.select("*").from(VAsRepairOrder.class);
        sql.where("shop_id", Criterion.EQ,shop_id);
        sql.where("create_time",Criterion.BETWEEN,String.valueOf(month[0]),String.valueOf(month[1]));


        return list;
    }
}
